<div id="CVS-in-repository"></div>
<div class="header">
<p>
Next: [[cvs: CVS locks in the repository#CVS locks in the repository|Locks]], Previous: [[cvs: The attic#The attic|Attic]], Up: [[cvs: How data is stored in the repository#How data is stored in the repository|Repository storage]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="The-CVS-directory-in-the-repository"></div>
==== The CVS directory in the repository ====
<div id="index-CVS-directory_002c-in-repository"></div>

The &lsquo;<tt>CVS</tt>&rsquo; directory in each repository directory
contains information such as file attributes (in a file
called &lsquo;<tt>CVS/fileattr</tt>&rsquo;.  In the
future additional files may be added to this directory,
so implementations should silently ignore additional
files.

This behavior is implemented only by <small>CVS</small> 1.7 and
later; for details see [[cvs: Using watches with old versions of CVS#Using watches with old versions of CVS|Watches Compatibility]].

The format of the fileattr file is a series of entries
of the following form (where &lsquo;<code><nowiki>{</nowiki></code>&rsquo; and &lsquo;<code><nowiki>}</nowiki></code>&rsquo;
means the text between the braces can be repeated zero
or more times):

<var>ent-type</var> <var>filename</var> &lt;tab&gt; <var>attrname</var> = <var>attrval</var>
<nowiki>{</nowiki>; <var>attrname</var> = <var>attrval</var><nowiki>}</nowiki> &lt;linefeed&gt;

<var>ent-type</var> is &lsquo;<code>F</code>&rsquo; for a file, in which case the entry specifies the
attributes for that file.

<var>ent-type</var> is &lsquo;<code>D</code>&rsquo;,
and <var>filename</var> empty, to specify default attributes
to be used for newly added files.

Other <var>ent-type</var> are reserved for future expansion.  <small>CVS</small> 1.9 and older
will delete them any time it writes file attributes.
<small>CVS</small> 1.10 and later will preserve them.

Note that the order of the lines is not significant;
a program writing the fileattr file may
rearrange them at its convenience.

There is currently no way of quoting tabs or linefeeds in the
filename, &lsquo;<code>=</code>&rsquo; in <var>attrname</var>,
&lsquo;<code>;</code>&rsquo; in <var>attrval</var>, etc.  Note: some implementations also
don&rsquo;t handle a NUL character in any of the fields, but
implementations are encouraged to allow it.

By convention, <var>attrname</var> starting with &lsquo;<code>_</code>&rsquo; is for an attribute given
special meaning by <small>CVS</small>; other <var>attrname</var>s are for user-defined attributes
(or will be, once implementations start supporting user-defined attributes).

Builtin attributes:

;<code>_watched</code>
: Present means the file is watched and should be checked out read-only.

;<code>_watchers</code>
: Users with watches for this file.  Value is <var>watcher</var> &gt; <var>type</var> <nowiki>{</nowiki> , <var>watcher</var> &gt; <var>type</var> <nowiki>}</nowiki> where <var>watcher</var> is a username, and <var>type</var> is zero or more of edit,unedit,commit separated by &lsquo;<code>+</code>&rsquo; (that is, nothing if none; there is no &quot;none&quot; or &quot;all&quot; keyword).

;<code>_editors</code>
: Users editing this file.  Value is <var>editor</var> &gt; <var>val</var> <nowiki>{</nowiki> , <var>editor</var> &gt; <var>val</var> <nowiki>}</nowiki> where <var>editor</var> is a username, and <var>val</var> is <var>time</var>+<var>hostname</var>+<var>pathname</var>, where <var>time</var> is when the <code>cvs edit</code> command (or equivalent) happened, and <var>hostname</var> and <var>pathname</var> are for the working directory.

Example:

<div class="example" style="margin-left: 3.2em">
 Ffile1 _watched=;_watchers=joe&gt;edit,mary&gt;commit
 Ffile2 _watched=;_editors=sue&gt;8 Jan 1975+workstn1+/home/sue/cvs
 D _watched=
</div>

means that the file &lsquo;<tt>file1</tt>&rsquo; should be checked out
read-only.  Furthermore, joe is watching for edits and
mary is watching for commits.  The file &lsquo;<tt>file2</tt>&rsquo;
should be checked out read-only; sue started editing it
on 8 Jan 1975 in the directory &lsquo;<tt>/home/sue/cvs</tt>&rsquo; on
the machine <code>workstn1</code>.  Future files which are
added should be checked out read-only.  To represent
this example here, we have shown a space after
&lsquo;<code>D</code>&rsquo;, &lsquo;<code>Ffile1</code>&rsquo;, and &lsquo;<code>Ffile2</code>&rsquo;, but in fact
there must be a single tab character there and no spaces.


----

<div class="header">
<p>
Next: [[cvs: CVS locks in the repository#CVS locks in the repository|Locks]], Previous: [[cvs: The attic#The attic|Attic]], Up: [[cvs: How data is stored in the repository#How data is stored in the repository|Repository storage]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
